package com.ys.enume.sys;

public class TsMenuInfoEnum {
	
	public enum MenuType {
		ONE("一级菜单", 1), TWO("二级菜单", 2);
		public String name;
		public Integer value;

		private MenuType(String name, Integer value) {
			this.name = name;
			this.value = value;
		}
	}
	
	/**
	 * 菜单是否显示
	 */
	public enum MenuState {
		YES("显示", 1), NO("不显示", 0);
		public String name;
		public Integer value;

		private MenuState(String name, Integer value) {
			this.name = name;
			this.value = value;
		}

		public static String getName(int value) {
			for (MenuState e : MenuState.values()) {
				if (e.value == value) {
					return e.name;
				}
			}

			return "";
		}
	}
}
